<template>
  <div ref="watermarkRef" class="watermark">
    <el-button type="primary" @click="delectSY">去掉水印</el-button>
  </div>
</template>

<script setup lang="ts" name="watermark">
import { onMounted, ref } from 'vue'
import { removeWatermark, setWaterMark } from './watermark'
const watermarkRef = ref<HTMLElement>()
onMounted(() => {
  setWaterMark('我的水印', new Date(), watermarkRef.value)
})
const delectSY = () => {
  removeWatermark(watermarkRef.value)
}
</script>

<style scoped>
.watermark {
  width: 100%;
  height: 100%;
  position: relative;
}
</style>
